package com.supermarket.api.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 商品Sku表
 * @author 李其伟
 * @date 2023/10/19
 */
@Data
@Entity
@Table(name = "sm_product_sku")
@org.hibernate.annotations.Table(appliesTo = "sm_product_sku",comment="商品Sku表")
public class ProductSkuEntity extends BaseEntity {

    @Column(name = "sku", columnDefinition = " char(64) not null comment '商品货号' ")
    private String sku;

    @Column(name = "sku_code", columnDefinition = " char(64) not null unique comment '商品规格' ")
    private String skuCode;

    @Column(name = "title", columnDefinition = " varchar(256) comment '商品标题' ")
    private String title;

    @Column(name = "sub_title", columnDefinition = " varchar(512) comment '商品副标题' ")
    private String subTitle;

    @Column(name = "pic", columnDefinition = " varchar(512) comment '图片' ")
    private String pic;

    @Column(name = "sale", columnDefinition = " int(11) comment '销量' ")
    private Integer sale;

    @Column(name = "price", columnDefinition = " decimal(10, 2) comment '价格' ")
    private BigDecimal price;

    @Column(name = "sp_data", columnDefinition = " varchar(1024) comment '商品销售属性' ")
    private String spData;

    @Column(name = "res_uuid", columnDefinition = " char(64) comment '资源标识' ")
    private String resUuid;

}
